package com.xuecheng.learning.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xuecheng.learning.domain.Member;
import com.xuecheng.learning.mapper.MemberMapper;
import com.xuecheng.learning.service.MemberService;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author itheima
 * @since 2022-08-08
 */
@Service
public class MemberServiceImpl extends ServiceImpl<MemberMapper, Member> implements MemberService {

    /*//机构成员
    @Override
    public ResponseResult memberList(PageRequest request) {
        //1.开启分页
        Page<Member> page = new Page<>(request.getPageNo(),request.getPageSize());
        //2.构建条件
        LambdaQueryWrapper<Member> qw = new LambdaQueryWrapper<>();
        //qw.eq(Member::getUserId, AuthInfoHolder.getUserId());
        qw.eq(Member::getCompanyId,AuthInfoHolder.getCompanyId());
        Member member = this.getOne(qw);
        //3.执行分页
        page=this.page(page,qw);
        //4.转vo
        List<Member> memberList = page.getRecords();
        List<MemberVo> voList = BeanHelper.copyWithCollection(memberList, MemberVo.class);
        //5.返回
        return PageResponseResult.okResult(page.getTotal(),voList);
    }*/
}
